package Thread_;

public class Thread07 {
    public static void main(String[] args) {
        Thread thread = new Thread(){
            @Override
            public void run() {
                System.out.println("Thread run06");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        };
        System.out.println("start之前:"+thread.isAlive());
        thread.start();
        System.out.println("start之后:"+thread.isAlive());
        System.out.println("main");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("2s之后:"+thread.isAlive());
    }
}
